package LeetCode.LeetCode2;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

public class Num217 {
    public boolean containsDuplicate(int[] nums){
        Set<Integer> set = new HashSet<>();
        for (int i :nums) {
            if(set.add(i)){
                return false;
            }
        }
        return true;
    }
}
